\(\int x (a+b \sec ^{-1}(c x)) \, dx\) [6]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 10, antiderivative size = 39 \[ \int x \left (a+b \sec ^{-1}(c x)\right ) \, dx=-\frac {b \sqrt {1-\frac {1}{c^2 x^2}} x}{2 c}+\frac {1}{2} x^2 \left (a+b \sec ^{-1}(c x)\right ) \]

[Out]

1/2*x^2*(a+b*arcsec(c*x))-1/2*b*x*(1-1/c^2/x^2)^(1/2)/c

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {5328, 197} \[ \int x \left (a+b \sec ^{-1}(c x)\right ) \, dx=\frac {1}{2} x^2 \left (a+b \sec ^{-1}(c x)\right )-\frac {b x \sqrt {1-\frac {1}{c^2 x^2}}}{2 c} \]

[In]

Int[x*(a + b*ArcSec[c*x]),x]

[Out]

-1/2*(b*Sqrt[1 - 1/(c^2*x^2)]*x)/c + (x^2*(a + b*ArcSec[c*x]))/2

Rule 197

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[x*((a + b*x^n)^(p + 1)/a), x] /; FreeQ[{a, b, n, p}, x] &
& EqQ[1/n + p + 1, 0]

Rule 5328

Int[((a_.) + ArcSec[(c_.)*(x_)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*ArcSec[c*x]
)/(d*(m + 1))), x] - Dist[b*(d/(c*(m + 1))), Int[(d*x)^(m - 1)/Sqrt[1 - 1/(c^2*x^2)], x], x] /; FreeQ[{a, b, c
, d, m}, x] && NeQ[m, -1]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{2} x^2 \left (a+b \sec ^{-1}(c x)\right )-\frac {b \int \frac {1}{\sqrt {1-\frac {1}{c^2 x^2}}} \, dx}{2 c} \\ & = -\frac {b \sqrt {1-\frac {1}{c^2 x^2}} x}{2 c}+\frac {1}{2} x^2 \left (a+b \sec ^{-1}(c x)\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.28 \[ \int x \left (a+b \sec ^{-1}(c x)\right ) \, dx=\frac {a x^2}{2}-\frac {b x \sqrt {\frac {-1+c^2 x^2}{c^2 x^2}}}{2 c}+\frac {1}{2} b x^2 \sec ^{-1}(c x) \]

[In]

Integrate[x*(a + b*ArcSec[c*x]),x]

[Out]

(a*x^2)/2 - (b*x*Sqrt[(-1 + c^2*x^2)/(c^2*x^2)])/(2*c) + (b*x^2*ArcSec[c*x])/2

Maple [A] (verified)

Time = 0.25 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.56

method result size
parts \(\frac {a \,x^{2}}{2}+\frac {b \left (\frac {c^{2} x^{2} \operatorname {arcsec}\left (c x \right )}{2}-\frac {c^{2} x^{2}-1}{2 \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, c x}\right )}{c^{2}}\) \(61\)
derivativedivides \(\frac {\frac {a \,c^{2} x^{2}}{2}+b \left (\frac {c^{2} x^{2} \operatorname {arcsec}\left (c x \right )}{2}-\frac {c^{2} x^{2}-1}{2 \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, c x}\right )}{c^{2}}\) \(65\)
default \(\frac {\frac {a \,c^{2} x^{2}}{2}+b \left (\frac {c^{2} x^{2} \operatorname {arcsec}\left (c x \right )}{2}-\frac {c^{2} x^{2}-1}{2 \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, c x}\right )}{c^{2}}\) \(65\)

[In]

int(x*(a+b*arcsec(c*x)),x,method=_RETURNVERBOSE)

[Out]

1/2*a*x^2+b/c^2*(1/2*c^2*x^2*arcsec(c*x)-1/2/((c^2*x^2-1)/c^2/x^2)^(1/2)/c/x*(c^2*x^2-1))

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.03 \[ \int x \left (a+b \sec ^{-1}(c x)\right ) \, dx=\frac {b c^{2} x^{2} \operatorname {arcsec}\left (c x\right ) + a c^{2} x^{2} - \sqrt {c^{2} x^{2} - 1} b}{2 \, c^{2}} \]

[In]

integrate(x*(a+b*arcsec(c*x)),x, algorithm="fricas")

[Out]

1/2*(b*c^2*x^2*arcsec(c*x) + a*c^2*x^2 - sqrt(c^2*x^2 - 1)*b)/c^2

Sympy [A] (verification not implemented)

Time = 0.81 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.49 \[ \int x \left (a+b \sec ^{-1}(c x)\right ) \, dx=\frac {a x^{2}}{2} + \frac {b x^{2} \operatorname {asec}{\left (c x \right )}}{2} - \frac {b \left (\begin {cases} \frac {\sqrt {c^{2} x^{2} - 1}}{c} & \text {for}\: \left |{c^{2} x^{2}}\right | > 1 \\\frac {i \sqrt {- c^{2} x^{2} + 1}}{c} & \text {otherwise} \end {cases}\right )}{2 c} \]

[In]

integrate(x*(a+b*asec(c*x)),x)

[Out]

a*x**2/2 + b*x**2*asec(c*x)/2 - b*Piecewise((sqrt(c**2*x**2 - 1)/c, Abs(c**2*x**2) > 1), (I*sqrt(-c**2*x**2 +
1)/c, True))/(2*c)

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.95 \[ \int x \left (a+b \sec ^{-1}(c x)\right ) \, dx=\frac {1}{2} \, a x^{2} + \frac {1}{2} \, {\left (x^{2} \operatorname {arcsec}\left (c x\right ) - \frac {x \sqrt {-\frac {1}{c^{2} x^{2}} + 1}}{c}\right )} b \]

[In]

integrate(x*(a+b*arcsec(c*x)),x, algorithm="maxima")

[Out]

1/2*a*x^2 + 1/2*(x^2*arcsec(c*x) - x*sqrt(-1/(c^2*x^2) + 1)/c)*b

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 634 vs. \(2 (33) = 66\).

Time = 0.29 (sec) , antiderivative size = 634, normalized size of antiderivative = 16.26 \[ \int x \left (a+b \sec ^{-1}(c x)\right ) \, dx=\frac {1}{2} \, c {\left (\frac {b \arccos \left (\frac {1}{c x}\right )}{c^{3} + \frac {2 \, c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}}{{\left (\frac {1}{c x} + 1\right )}^{2}} + \frac {c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}^{2}}{{\left (\frac {1}{c x} + 1\right )}^{4}}} + \frac {a}{c^{3} + \frac {2 \, c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}}{{\left (\frac {1}{c x} + 1\right )}^{2}} + \frac {c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}^{2}}{{\left (\frac {1}{c x} + 1\right )}^{4}}} - \frac {2 \, b {\left (\frac {1}{c^{2} x^{2}} - 1\right )} \arccos \left (\frac {1}{c x}\right )}{{\left (c^{3} + \frac {2 \, c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}}{{\left (\frac {1}{c x} + 1\right )}^{2}} + \frac {c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}^{2}}{{\left (\frac {1}{c x} + 1\right )}^{4}}\right )} {\left (\frac {1}{c x} + 1\right )}^{2}} - \frac {2 \, b \sqrt {-\frac {1}{c^{2} x^{2}} + 1}}{{\left (c^{3} + \frac {2 \, c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}}{{\left (\frac {1}{c x} + 1\right )}^{2}} + \frac {c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}^{2}}{{\left (\frac {1}{c x} + 1\right )}^{4}}\right )} {\left (\frac {1}{c x} + 1\right )}} - \frac {2 \, a {\left (\frac {1}{c^{2} x^{2}} - 1\right )}}{{\left (c^{3} + \frac {2 \, c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}}{{\left (\frac {1}{c x} + 1\right )}^{2}} + \frac {c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}^{2}}{{\left (\frac {1}{c x} + 1\right )}^{4}}\right )} {\left (\frac {1}{c x} + 1\right )}^{2}} + \frac {b {\left (\frac {1}{c^{2} x^{2}} - 1\right )}^{2} \arccos \left (\frac {1}{c x}\right )}{{\left (c^{3} + \frac {2 \, c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}}{{\left (\frac {1}{c x} + 1\right )}^{2}} + \frac {c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}^{2}}{{\left (\frac {1}{c x} + 1\right )}^{4}}\right )} {\left (\frac {1}{c x} + 1\right )}^{4}} + \frac {2 \, b {\left (-\frac {1}{c^{2} x^{2}} + 1\right )}^{\frac {3}{2}}}{{\left (c^{3} + \frac {2 \, c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}}{{\left (\frac {1}{c x} + 1\right )}^{2}} + \frac {c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}^{2}}{{\left (\frac {1}{c x} + 1\right )}^{4}}\right )} {\left (\frac {1}{c x} + 1\right )}^{3}} + \frac {a {\left (\frac {1}{c^{2} x^{2}} - 1\right )}^{2}}{{\left (c^{3} + \frac {2 \, c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}}{{\left (\frac {1}{c x} + 1\right )}^{2}} + \frac {c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}^{2}}{{\left (\frac {1}{c x} + 1\right )}^{4}}\right )} {\left (\frac {1}{c x} + 1\right )}^{4}}\right )} \]

[In]

integrate(x*(a+b*arcsec(c*x)),x, algorithm="giac")

[Out]

1/2*c*(b*arccos(1/(c*x))/(c^3 + 2*c^3*(1/(c^2*x^2) - 1)/(1/(c*x) + 1)^2 + c^3*(1/(c^2*x^2) - 1)^2/(1/(c*x) + 1
)^4) + a/(c^3 + 2*c^3*(1/(c^2*x^2) - 1)/(1/(c*x) + 1)^2 + c^3*(1/(c^2*x^2) - 1)^2/(1/(c*x) + 1)^4) - 2*b*(1/(c
^2*x^2) - 1)*arccos(1/(c*x))/((c^3 + 2*c^3*(1/(c^2*x^2) - 1)/(1/(c*x) + 1)^2 + c^3*(1/(c^2*x^2) - 1)^2/(1/(c*x
) + 1)^4)*(1/(c*x) + 1)^2) - 2*b*sqrt(-1/(c^2*x^2) + 1)/((c^3 + 2*c^3*(1/(c^2*x^2) - 1)/(1/(c*x) + 1)^2 + c^3*
(1/(c^2*x^2) - 1)^2/(1/(c*x) + 1)^4)*(1/(c*x) + 1)) - 2*a*(1/(c^2*x^2) - 1)/((c^3 + 2*c^3*(1/(c^2*x^2) - 1)/(1
/(c*x) + 1)^2 + c^3*(1/(c^2*x^2) - 1)^2/(1/(c*x) + 1)^4)*(1/(c*x) + 1)^2) + b*(1/(c^2*x^2) - 1)^2*arccos(1/(c*
x))/((c^3 + 2*c^3*(1/(c^2*x^2) - 1)/(1/(c*x) + 1)^2 + c^3*(1/(c^2*x^2) - 1)^2/(1/(c*x) + 1)^4)*(1/(c*x) + 1)^4
) + 2*b*(-1/(c^2*x^2) + 1)^(3/2)/((c^3 + 2*c^3*(1/(c^2*x^2) - 1)/(1/(c*x) + 1)^2 + c^3*(1/(c^2*x^2) - 1)^2/(1/
(c*x) + 1)^4)*(1/(c*x) + 1)^3) + a*(1/(c^2*x^2) - 1)^2/((c^3 + 2*c^3*(1/(c^2*x^2) - 1)/(1/(c*x) + 1)^2 + c^3*(
1/(c^2*x^2) - 1)^2/(1/(c*x) + 1)^4)*(1/(c*x) + 1)^4))

Mupad [B] (verification not implemented)

Time = 0.78 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.03 \[ \int x \left (a+b \sec ^{-1}(c x)\right ) \, dx=\frac {a\,x^2}{2}+\frac {b\,x^2\,\mathrm {acos}\left (\frac {1}{c\,x}\right )}{2}-\frac {b\,x\,\sqrt {1-\frac {1}{c^2\,x^2}}}{2\,c} \]

[In]

int(x*(a + b*acos(1/(c*x))),x)

[Out]

(a*x^2)/2 + (b*x^2*acos(1/(c*x)))/2 - (b*x*(1 - 1/(c^2*x^2))^(1/2))/(2*c)